home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
mcu11
/
gloadd3b.arc
/
GJMPD3.ASM
< prev
next >
Wrap
Assembly Source File
|
1991-09-13
|
4KB
|
115 lines
******************************************************************************
******************************************************************************
* *
* Routine to Jump to EPROM *
* *
******************************************************************************
* *
* Program Name: GJMPD3.ASM *
* Revision: 0.02 *
* Date: 9/13/91 *
* Written By: Robert Chretien *
* Motorola MCU Applications *
* Assembled Under: Motorola Portable Cross Assembler (PASM) or *
* Motorola Freeware Assembler (AS11) *
* Program Description: *
* *
* *
* *
* *
* *
******************************************************************************
* *
* Revision Descriptions: *
* 1. Rev 0.01: Original program. *
* 2. Changed jump to start of program from a jump to $F000 to having *
* program get start address from reset vector. *
* *
******************************************************************************
******************************************************************************
RAM EQU $0040
REGS EQU $0000
Eprom EQU $F000
Vectors EQU $FFD6
PortA EQU REGS+$00
PortC EQU REGS+$03
PortB EQU REGS+$04
DDRC EQU REGS+$07
PortD EQU REGS+$08
DDRD EQU REGS+$09
CFORC EQU REGS+$0B
TCNT EQU REGS+$0E
TOC2 EQU REGS+$18
TCTL1 EQU REGS+$20
TCTL2 EQU REGS+$21
TMSK1 EQU REGS+$22
TFLG1 EQU REGS+$23
TMSK2 EQU REGS+$24
TFLG2 EQU REGS+$25
PACTL EQU REGS+$26
Baud EQU REGS+$2B
SCCR2 EQU REGS+$2D
SCSR EQU REGS+$2E
SCDR EQU REGS+$2F
OPTION EQU REGS+$39
*
*
*
FileLength EQU RAM
Address EQU RAM+1
RecordLength EQU RAM+3
CheckSum EQU RAM+4
BoardAddress EQU RAM+5
*
*
*
ORG RAM
Initial LDS #$00FF !Set stack pointer to $FF.
LDAA #$30
STAA Baud !With 8MHz crystal, baud=9600.
LDAA #$0C
STAA SCCR2 !Transmitter and receiver enabled.
*
*
*
CLR CheckSum
CalAddress LDAA PortD
LSRA
LSRA
ANDA #%00000111
STAA BoardAddress
BootRecAddr JSR Wait4Rec
CBA
BNE Boot4Last
STAA SCDR
JSR Wait4Rec
LDAA CheckSum
STAA SCDR
Boot4Last CMPB #08
BNE BootRecAddr
BSR Wait4Rec
LDX $FFFE
JMP 0,X !Jump back to EPROM.
*
*
*
Wait4Rec LDAB SCSR
ANDB #%00100000
BEQ Wait4Rec
LDAB SCDR
RTS
*
*
*
Wait4Trans LDAA SCSR
ANDA #%10000000
BEQ Wait4Trans
RTS
*
*
*
END EQU *
END